package Object;

public class Dog extends Animal{

    private String name;
    @Override
    public void bark() {
        System.out.println(name + "汪汪汪");
    }
//   public String getName(){
//        return "小狗";
//   }
    public Dog(){
        this.name = "小狗";
        System.out.println("调用子类构造方法");
    }


}
